// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 此处后端没有提供注释 POST /generateTeach/delete/${param0} */
export async function deleteGenerateTeach(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteGenerateTeachParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.BaseResponseBoolean>(`/generateTeach/delete/${param0}`, {
    method: 'POST',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/edit */
export async function updateGenerateTeach(
  body: API.GenerateTeachUpdateDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>('/generateTeach/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/generateTeachAsy */
export async function generateTeachFileAsy(
  body: API.GenerateTeachFileRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseGenerateTeachVO>('/generateTeach/generateTeachAsy', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/generateTeachSyn */
export async function generateTeachFile(
  body: API.GenerateTeachFileRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseGenerateTeachVO>('/generateTeach/generateTeachSyn', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /generateTeach/get/${param0} */
export async function getGenerateTeachVo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGenerateTeachVOParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.BaseResponseGenerateTeachVO>(`/generateTeach/get/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/list/page/vo */
export async function listGenerateTeachVoByPage(
  body: API.GenerateTeachQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageGenerateTeachVO>('/generateTeach/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /generateTeach/upload */
export async function uploadTeachFile(file:File, options?: { [key: string]: any }) {
// 使用 FormData 构建请求体
  const formData = new FormData();
  formData.append('file', file); // 将文件添加到 FormData

  return request<API.BaseResponseUploadReturnVO>('/generateTeach/upload', {
    method: 'POST',
    data: formData,
    ...(options || {}),
  })
}
